﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace ExtendBLL
{
    public class ProjectAppointment : LabMS.BLL.ProjectAppointment
    {
        public void Del(string strWhere)
        {
            string strSQL = "delete from ProjectAppointment " + strWhere;
            try
            {
                Maticsoft.DBUtility.DbHelperSQL.ExecuteSql(strSQL);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<LabMS.Model.Student> GetStudentByProject(string ProjectCode)
        {
            string strSQL = "select s.* from Student s, ProjectAppointment pa where pa.OP_ProjectCode = '" + ProjectCode 
                                + "' and pa.OP_Appoint_ID = s.ID";
            List<LabMS.Model.Student> modelList = new List<LabMS.Model.Student>();
            DataSet ds = new DataSet();
            try
            {
                ds = Maticsoft.DBUtility.DbHelperSQL.Query(strSQL);
                modelList = ExtendBLL.Student.DataSettoStudentModule(ds);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return modelList;
        }
        
        
    }
}
